package com.mooc.mymooc.service;

import com.mooc.mymooc.pojo.*;
import com.mooc.mymooc.utils.PageModel;
import java.util.List;
import java.util.Map;

public interface MoocService {
    public User login(String username, String password);

    public void register(User user);

    public Integer checkActive(Integer id);

    public User findById(Integer id);

    public Integer updateUser(User user);

    public Integer updateImage(User user);

    public Integer insertEmailCode(Email email);

    public String findCode(String email);

    public Integer updateEmail(User user);

    public Integer findByEmail(String email);

    void removeByEmail(String email);

    public Integer updatePwd(User user);

    public List<Organization> findAllOrg(Organization organization, String sort, PageModel pageModel);

    public City findById(String id);

    public List<Course> findCourseById(Integer id);

    public List<City> findAllCity();

    public Integer count();

    public List<Organization> findTop4Org();

    public Integer insertUserAsk(UserAsk userAsk);

    public List<Organization> findAllButNoIdea(Map map);

    public Organization findOrgById(Integer id);

    public List<Teacher> findTeacherByOrg(Integer id);

    public List<Course> findCourseByIdd(Integer id);

    public Integer insertUserFav(UserFavorite userFavorite);

    public Integer findUserFav(UserFavorite userFavorite);

    public Integer removeUserFav(Integer id);

    public UserFavorite findIsFavIndex(UserFavorite userFavorite);

    public Integer addFav_nums(Integer id);

    public Integer removeFav_nums(Integer id);

    public Integer addFav_nums_org(Integer id);

    public Integer removeFav_nums_org(Integer id);

    public List<Course> findByPage(Map map);

    public List<Course> findAllCourse(PageModel pageModel, String sort);

    public Integer countsCourse();

    public Teacher findTeacherById(Integer id);

    public Course findCourseByIdDetail(Integer id);

    public Integer insertStartStudy(TempCourse userCourse);

    public List<Lesson> findLessonById(Integer id);

    public List<CourseVideo> findVideoById(Integer id);

    public Integer findUserCourseExits(TempCourse userCourse);

    public Integer updateStudents(Integer id);

    public List<CourseComments> findAllCommentsByOrgId(Integer id);

    public Integer addCourseComments(CourseComments courseComments);

    public Admin findAdmin(Admin admin);

    public Integer addCourseOrg(Organization organization);

    public List<Organization> findAllOrgUseInBackGround(Organization organization);

    public Integer updateOrg(Organization organization);

    public Integer removeOrg(Integer id);

    public Integer addCourse(Course course);

    public List<Course> findAllCourseInBackGround(Course course);

    public Integer removeCourse(Integer id);

    public Integer updateCourse(Course course);

    public Integer addLesson(Lesson lesson);

    public Integer updateLesson(Lesson lesson);

    public Integer addVideo(CourseVideo courseVideo);

    public Lesson findLessonByIdInBackGround(Integer id);

    public List<CourseComments> findAllComment(CourseComments courseComments);

    public List<User> findUserByName(String name);

    public Integer deleteComments(Integer id);

    public List<Teacher> findAllTeacher(PageModel pageModel, String sort);

    public Integer countTeachers();

    public Integer updateFavnumsreduce(Integer id);

    public Integer updateFavnumsadd(Integer id);

    public Integer addUser(User user);

    public User findUserByEmail(String email);

    public List<UserMessage> findMessageByUser(Integer id);

    public Integer setMessageRead(Integer id);

    public Integer sendMessageToUser(UserMessage userMessage);

    public List<User> findAllUser();

    public List<UserCourse> findUserCourseInUserCenter(User user);

    public Integer[] findUserFavs(Map map);

    public Integer deleteUserFav(Map map);

    public Integer[] findCourseStudents(Course course);

    public Integer addClickNums(Integer id);

    public Integer addClickNums_org(Integer id);

    public Integer addClickNums_teacher(Integer id);

    public Integer changeUserPassword(TempEmail tempEmail);

    public Integer addTeacher(Teacher teacher);

    public List<Teacher> findTeacherInBackGround(Teacher teacher);

    public Integer removeTeacher(Integer id);

    public Integer updateTeacher(Teacher teacher);

    public Integer addBanner(Banner banner);

    public List<Banner> findAllBanner();

    public Integer updateBanner(Banner banner);

    public List<Course> searchCourse(String name);





















}
